package com.javasm.domin.entity.stockEntity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;

/**
 *
 * @TableName put_storage_goods
 */
@TableName(value ="put_storage_goods")
@Data
public class PutStorageGoods implements Serializable {
    /**
     *
     */
    @TableId
    private Integer id;

    /**
     *
     */
    private String productCode;

    /**
     *
     */
    private Integer productColorId;

    /**
     *
     */
    private String productName;

    /**
     *
     */
    private Integer purchaseNum;

    /**
     *
     */
    private Integer putStorageImelId;

    /**
     *
     */
    private Integer putStorageNum;

    /**
     *
     */
    private Integer goodsId;

    /**
     *
     */
    private Integer intoState;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        PutStorageGoods other = (PutStorageGoods) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
                && (this.getProductCode() == null ? other.getProductCode() == null : this.getProductCode().equals(other.getProductCode()))
                && (this.getProductColorId() == null ? other.getProductColorId() == null : this.getProductColorId().equals(other.getProductColorId()))
                && (this.getProductName() == null ? other.getProductName() == null : this.getProductName().equals(other.getProductName()))
                && (this.getPurchaseNum() == null ? other.getPurchaseNum() == null : this.getPurchaseNum().equals(other.getPurchaseNum()))
                && (this.getPutStorageImelId() == null ? other.getPutStorageImelId() == null : this.getPutStorageImelId().equals(other.getPutStorageImelId()))
                && (this.getPutStorageNum() == null ? other.getPutStorageNum() == null : this.getPutStorageNum().equals(other.getPutStorageNum()))
                && (this.getGoodsId() == null ? other.getGoodsId() == null : this.getGoodsId().equals(other.getGoodsId()))
                && (this.getIntoState() == null ? other.getIntoState() == null : this.getIntoState().equals(other.getIntoState()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getProductCode() == null) ? 0 : getProductCode().hashCode());
        result = prime * result + ((getProductColorId() == null) ? 0 : getProductColorId().hashCode());
        result = prime * result + ((getProductName() == null) ? 0 : getProductName().hashCode());
        result = prime * result + ((getPurchaseNum() == null) ? 0 : getPurchaseNum().hashCode());
        result = prime * result + ((getPutStorageImelId() == null) ? 0 : getPutStorageImelId().hashCode());
        result = prime * result + ((getPutStorageNum() == null) ? 0 : getPutStorageNum().hashCode());
        result = prime * result + ((getGoodsId() == null) ? 0 : getGoodsId().hashCode());
        result = prime * result + ((getIntoState() == null) ? 0 : getIntoState().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", productCode=").append(productCode);
        sb.append(", productColorId=").append(productColorId);
        sb.append(", productName=").append(productName);
        sb.append(", purchaseNum=").append(purchaseNum);
        sb.append(", putStorageImelId=").append(putStorageImelId);
        sb.append(", putStorageNum=").append(putStorageNum);
        sb.append(", goodsId=").append(goodsId);
        sb.append(", intoState=").append(intoState);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
